<?php


namespace app\demo\controller\content;


use app\common\controller\BaseController;
use hg\apidoc\annotation as Apidoc;
use think\facade\Db;

/**
 * @Apidoc\Title("内容")
 * @Apidoc\Group("content")
 * @Apidoc\Sort("100")
 */
class Test extends BaseController
{
    /**
     * @Apidoc\Title("内容分类列表")
     * @Apidoc\Returned("list", type="tree", desc="分类树形", children={
     *   @Apidoc\Returned(ref="app\common\model\content\CategoryModel", field="category_id,category_pid,category_name,category_unique"),
     *   @Apidoc\Returned(ref="app\common\model\content\CategoryModel\getImageUrlAttr", field="image_url"),
     * })
     */
    public function index(){
        #接口文档案例


        #db查询 use think\facade\Db;
        $data = Db::table("tp_member_api")->select()->toArray();
        return success($data);
    }
}
